home *** CD-ROM | disk | FTP | other *** search
Text File | 1999-03-04 | 3.4 KB | 109 lines | [TEXT/ToyS] |
- property kasLoc : {40, 60}
- property gasInfos : 0
-
-
- on open fsObjs
- repeat with fsObj in fsObjs
- DoOne(fsObj)
- end repeat
- end open
-
-
- on idle
- return 60
- end idle
-
-
- on quit
- if (the class of gasInfos is list) then
- repeat with infW in gasInfos
- set kasLoc to screen location of (display info infW with disposal)
- end repeat
- set gasInfos to 0
- end if
- continue quit
- end quit
-
-
- on DoOne(fsObj)
- set pci to the picture info for (the image from fsObj)
- set infW to (display info titled (catalog name of (basic info for fsObj)) located at kasLoc)
-
- -- List of windows
- if the class of gasInfos is list then
- set gasInfos to gasInfos & {infW}
- else
- set gasInfos to {infW}
- end if
-
- set n to ShowLine(infW, 1, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
- set n to ShowLine(infW, n, -1, "", "")
-
- set clr to 26 * 1024 + 29 * 32 + 26
- set n to ShowLine(infW, n, clr, "Picture Size", picture size of pci)
- set n to ShowLine(infW, n, clr, "Picture Bounds", RectString(picture bounds of pci))
- set n to ShowLine(infW, n, clr, "Source Bounds", RectString(picture source box of pci))
-
- set n to ShowLine(infW, n, -1, "Colors", "")
- set clr to 26 * 1024 + 26 * 32 + 29
- set n to ShowLine(infW, n, clr, "Unique Colors", image colors of pci)
- set n to ShowLine(infW, n, clr, "Optimal Depth", image depth of pci)
- set n to ShowLine(infW, n, clr, "DPI", PointString(picture resolution of pci))
-
- set n to ShowLine(infW, n, -1, "Objects", "")
- set clr to 29 * 1024 + 26 * 32 + 26
- set n to ShowLine(infW, n, clr, "Text", picture text count of pci)
- set n to ShowLine(infW, n, clr, "Lines", picture line count of pci)
- set n to ShowLine(infW, n, clr, "Rectangles", picture rect count of pci)
- set n to ShowLine(infW, n, clr, "Rounded Rectangles", picture rounded rect count of pci)
- set n to ShowLine(infW, n, clr, "Ovals", picture oval count of pci)
- set n to ShowLine(infW, n, clr, "Arcs", picture arc count of pci)
- set n to ShowLine(infW, n, clr, "Polygons", picture polygon count of pci)
- set n to ShowLine(infW, n, clr, "Regions", picture region count of pci)
- set n to ShowLine(infW, n, clr, "Images", picture image count of pci)
- set n to ShowLine(infW, n, clr, "Bitmaps", picture bits count of pci)
-
- set n to ShowLine(infW, n, -1, "QuickTime", "")
- set clr to 29 * 1024 + 29 * 32 + 26
- set n to ShowLine(infW, n, clr, "QT Images", picture compressed count of pci)
- set n to ShowLine(infW, n, clr, "QT Type", picture compression of pci)
- set n to ShowLine(infW, n, clr, "QT Quality", picture compressed quality of pci)
-
- -- Not good practice -- drawing into an info window :)
- draw a picture into infW ¬
- using data ((the icon for fsObj) as picture) ¬
- inside of {90, 4, 154, 68}
- end DoOne
-
-
- on RectString(box)
- return PointString(items 1 thru 2 of box) & ":" & PointString(items 3 thru 4 of box)
- end RectString
-
-
- on PointString(pt)
- return "(" & item 1 of pt & ¬
- ", " & item 2 of pt & ")"
- end PointString
-
-
- on ShowLine(w, lineNo, clr, lbl, txt)
- set lbl to recompose lbl padded to 20
- set txt to recompose txt padded to -20
- display info w message (lbl & txt) at line lineNo ¬
- using font "Courier" using size 10 ¬
- using bg color clr
- return lineNo + 1
- end ShowLine
-
-
- on ChooseName(prCfg)
- set choice to (LAN printer name of prCfg)
- if (choice is "") then set choice to print driver name of prCfg
- return choice
- end ChooseName
-